IF (LAPACK_LIBRARY_DIRS AND LAPACK_LIBRARIES)
  KOKKOSKERNELS_FIND_IMPORTED(LAPACK INTERFACE LIBRARIES ${LAPACK_LIBRARIES} LIBRARY_PATHS ${LAPACK_LIBRARY_DIRS})
ELSEIF (LAPACK_LIBRARIES)
  KOKKOSKERNELS_FIND_IMPORTED(LAPACK INTERFACE LIBRARIES ${LAPACK_LIBRARIES})
ELSEIF (LAPACK_LIBRARY_DIRS)
  KOKKOSKERNELS_FIND_IMPORTED(LAPACK INTERFACE LIBRARIES lapack LIBRARY_PATHS ${LAPACK_LIBRARY_DIRS})
ELSE()
  FIND_PACKAGE(LAPACK REQUIRED)
  KOKKOSKERNELS_CREATE_IMPORTED_TPL(LAPACK INTERFACE LINK_LIBRARIES ${LAPACK_LIBRARIES})
ENDIF()

